package com.neusoft.yiyang.care.client;

import com.neusoft.yiyang.common.entity.user.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "user-service")
public interface UserClient {

    // 根据用户ID获取用户姓名
    @GetMapping("/users/{userId}/name")
    String getUserNameById(@PathVariable("userId") Integer userId);

    // 根据用户ID获取用户信息
    @GetMapping("/users/{userId}")
    User getUserById(@PathVariable("userId") Integer userId);
}